﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SCategoryNav.ascx.cs" Inherits="Goods_SCategoryNav" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<%@ Import Namespace="Shopping.BLL" %>
<%@ Import Namespace="System.Collections.Generic" %>

<%
  if(SCategoryInfo != null)
  {
  %>
 <h1 class="importedtitleOne"><a href="<%=bllUrl.GetGoodsListUrl(SCategoryInfo.ParentID,SCategoryInfo.CategoryID) %>"><%=SCategoryInfo.CategoryName %></a></h1>
	  <ul class="importedFoods">
	    <li class="importedBottomLine">
           <%
               if (TCategorys != null)
               {
                   for (int m = 0; m < TCategorys.Count; ++m)
                   {
                       if (m == 0 || (m + 1) % 2 > 0)
                       {
                           Response.Write("<p class=\"dairyP\">");
                           Response.Write("<a  href=\"" + bllUrl.GetGoodsListUrl(SCategoryInfo.ParentID, SCategoryInfo.CategoryID, TCategorys[m].CategoryID) + "\" >");
                       }
                       else
                           Response.Write("<a  href=\"" + bllUrl.GetGoodsListUrl(SCategoryInfo.ParentID, SCategoryInfo.CategoryID, TCategorys[m].CategoryID) + "\" class=\"dairyA\">");
                       Response.Write(TCategorys[m].CategoryName);
                       Response.Write("</a>");
                       if ((m + 1) == TCategorys.Count || (m + 1) % 2 == 0)
                           Response.Write("</p>");
                   }
               }
             %>
	    </li>
	 </ul>
<%} %>